feat: use native macOS window frame on Apple Silicon#907
Conversation
On macOS, skip the Windows-style frameless window with custom TitleBar and resize Borders. Use Qt::Window with native decorations instead. Add NULL guards for _titleBar since it's not created on macOS. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
I did try your build and dropped it to sudo xattr -r -d com.apple.quarantine ~/Applications/DSView.app
xattr: No such file: /Users/rob/Applications/DSView.app/Contents/Frameworks/Python.framework/Versions/3.14/lib/python3.14/site-packages $ ls -l /Users/rob/Applications/DSView.app//Contents/Frameworks/Python.framework/Versions/3.14/lib/python3.14/ | grep site-packages
lrwxr-xr-x@ 1 rob staff 46 May 15 13:43 site-packages -> ../../../../../../lib/python3.14/site-packages
$ ls -l /Users/rob/Applications/DSView.app//Contents/Frameworks/Python.framework/Versions/3.14/lib/python3.14/site-packages/
ls: /Users/rob/Applications/DSView.app//Contents/Frameworks/Python.framework/Versions/3.14/lib/python3.14/site-packages/: No such file or directory
$ python3 --version
Python 3.14.5 |
|
Thanks for the detailed report! This is a build system issue — when the Python.framework is copied into the app bundle, a relative symlink (site-packages -> ../../../../../../lib/python3.14/site-packages) is preserved from the Homebrew installation, but the target directory (Contents/lib/python3.14/site-packages) isn't included in the bundle. This causes both codesign and xattr to fail. I'll also fix this in the build system so future builds handle the broken symlinks automatically. |
When macdeployqt copies Python.framework into the app bundle, relative symlinks from the Homebrew installation (e.g., site-packages) become broken because their targets don't exist inside the bundle. This causes codesign and xattr to fail. Added a `fixup_bundle` make target that replaces broken symlinks with real directories. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Summary
This PR replaces the Windows-style custom titlebar and resize borders with the native macOS window frame on
Q_OS_DARWIN. The customFramelessWindowHintapproach looks out of place on macOS and causes usability issues.Changes
DSView/pv/mainframe.cpp: On macOS, useQt::Windowinstead ofFramelessWindowHint, skip creatingTitleBarandBorderwidgets, useQGridLayoutdirectly for the main windowDSView/pv/mainwindow.cpp: Add#ifndef Q_OS_DARWINguard fortitle_barassertion since it'sNULLon macOSTested
#ifdef Q_OS_DARWIN)Screenshot
Before: Custom Windows-style titlebar with DSL logo, minimize/maximize/close buttons
After: Native macOS window frame with standard traffic light buttons and proxy icon
This addresses the request for native macOS arm64 builds (see v1.3.2-arm64 release with prebuilt .dmg at https://github.com/ZiWei09/DSView/releases).